import { createStore, applyMiddleware, compose  } from 'redux'
import reducer from './rootReducer'
import thunk from 'redux-thunk'

const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
const store = createStore(reducer, composeEnhancers(
  applyMiddleware(thunk)
));

// createStore需要接受参数 两个参数 参数1 是reducer 参数2 ...
export default store